<!doctype html>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>山东林业扶贫项目</title>
  <meta name="description" content="山东林业扶贫项目">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="${ctxStatic}/sdlyfp/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="${ctxStatic}/sdlyfp/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/amazeui.min.css" />
  <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/admin.css">
  <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/app.css">
  <script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
  <link rel="stylesheet" href="${ctxStatic}/sweetalert/sweetalert.css">
  <script src="${ctxStatic}/sweetalert/sweetalert.min.js"></script>
  <script src="${ctxStatic}/sdlyfp/js/base.js"></script>
  
</head>

<body data-type="generalComponents">

	<!-- head -->
	<jsp:include page="head.jsp" flush="false"></jsp:include>
	
	<div class="tpl-page-container tpl-page-header-fixed">
	
	<!-- 菜单 -->
	<jsp:include page="menu.jsp" flush="false"></jsp:include>


        <div class="tpl-content-wrapper" >
            <div class="tpl-content-page-title">
                日志列表
            </div>
            <ol class="am-breadcrumb">
                <li><a href="#" class="am-icon-home">首页</a></li> 
                <li class="am-active">日志列表</li>
            </ol>
            <div class="tpl-portlet-components" style="padding-bottom: 300px;">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> 日志列表
                    </div>
                    <%-- <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-small input-inline">
                            <div class="input-icon right">  <a href="${ctx }/gt/gtForest/form?menuId=${gtForest.menuId }"><button type="button" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</button></a>
                                 </div>
                        </div>
                    </div> --%>


                </div>
                <div class="tpl-block" >
                
                <form class="am-form" action="${ctx }/gt/gtLog" method="post">
                	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
					<input id="areaCode" name="area.code" type="hidden"/>
					
					<input type="hidden" id="menuId" name="menuId" value="${gtLog.menuId }"/>
					
                    <div class="am-g">
                    	
                    	
                    
                        <div class="am-u-sm-12 am-u-md-6">
                            <div class="am-input-group am-input-group-sm">
                            	
                            	
                            	<label style="float: left;">日期范围：</label>
									<input id="beginDate" style="float:left; width: 100px" name="beginDate" type="text" readonly="readonly" maxlength="20"
										value="<fmt:formatDate value="${log.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
										
									<label style="float: left;">&nbsp;--&nbsp;</label>
									
									<input style="float: left;width: 100px" id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20"
										value="<fmt:formatDate value="${log.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
                            	
                            	
                                <input type="text" name="title" value="${log.title }"  style="float:right;width:300px;margin-left:10px ">
                                <span class="am-input-group-btn">
					            <button class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search" type="button" onclick="doSubmit();"></button>
					          </span>
                            </div>
                        </div>
                        
                    </div>
                    
                    </form>
                    
                    
                    <div class="am-g">
                        <div class="am-u-sm-12">
                                <table class="am-table am-table-striped am-table-hover table-main">
                                    <thead>
                                        <tr>
                                            <th class="table-title">日志标题</th>
                                            <th class="table-title">操作账号</th>
                                            <th class="table-title">操作用户</th>
                                            <th class="table-title">操作人联系方式</th>
                                            <th class="table-title">操作人姓名</th>
                                            <th class="table-type">所属组织</th>
                                            <th class="table-type">操作ip</th>
                                            <th class="table-type">操作时间</th>
                                            <th class="table-author am-hide-sm-only">URI</th>
                                            <th class="table-type">提交方式</th>
                                            
                                            <!-- <th class="table-set">操作</th> -->
                                        </tr>
                                    </thead>
                                    <tbody>
                                    	<c:forEach items="${page.list }" var="log">
                                        <tr>
                                        
                                        	<td>${log.title}</td>
                                        	<td>${log.createBy.loginName }</td>
                                        	<td>${log.createBy.name }</td>
                                        	<td>${log.createBy.mobile }</td>
                                        	<td>${log.createBy.operName }</td>
                                            <td>${log.area.name }</td>
                                            <td>${log.remoteAddr }</td>
                                            <td><fmt:formatDate value="${log.createDate}" type="both"/></td>
                                            <td>${log.requestUri }</td>
                                            <td>${log.method }</td>
                                            
                                            <%-- <td>  
                                            	<div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <a class="am-btn am-btn-default am-btn-xs am-text-secondary" href="${ctx }/gt/gtForest/form?id=${forest.id }&menuId=${gtForest.menuId }"><span class="am-icon-pencil-square-o"></span> 修改</a></a>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only" type="button" onclick="del('${forest.id }');"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>  --%>
                                       </tr>
                                       </c:forEach>
                                    </tbody>
                                </table>
                                <div class="am-cf">

                                    <div class="am-fr">
                                        ${page }
                                    </div>
                                </div>
                                <hr>
                        </div>

                    </div>
                </div>
                <div class="tpl-alert"></div>
            </div>


        </div>

    </div>

  <script src="${ctxStatic}/sdlyfp/js/jquery.min.js"></script>
  <script src="${ctxStatic}/sdlyfp/js/amazeui.min.js"></script>
  <script src="${ctxStatic}/sdlyfp/js/app.js"></script>
</body>
<script type="text/javascript">
$(document).ready(function() {
	//$(".tpl-left-nav-menu").find("li a").eq(2).addClass("active");
	var menuId = '${gtForest.menuId }';
	if(menuId)
	{
		$(".tpl-left-nav-menu").find("#"+menuId).addClass("active");
	}
	
	var message = "${message}";
	if(message)
	{
		var messageType = "${messageType}";
		msg(message,3000,messageType);
	}
});

function doSubmit()
{
	var areaCode = $("#town").val();
	if(!areaCode || 'null' == areaCode)
	{
		areaCode = $("#county").val();
	}
	if(!areaCode || 'null' == areaCode)
	{
		areaCode = $("#region").val();
	}
	if(!areaCode || 'null' == areaCode)
	{
		areaCode = '${fns:getUser().area.code}';
	}
	
	$("#areaCode").val(areaCode);
	document.forms[0].submit();	
}

function del(forestId)
{
	var content = "您确认要删除吗？";
	var url = ctx + "/gt/gtForest/delete?id=" + forestId + "&menuId=${gtForest.menuId }";
	comfirmMsg(content,url,"warning");
}
</script>
</html>